<template>
	<view>
		<view class="flex align-center justify-between padding-24 bg-fff">
			<image @click="goBack()" src="../../static/img/back.png" style="width: 36rpx;height: 36rpx;"></image>
			<text class="fs-32 color-333 fw-600">{{classify_pid == 1 ? '我的菜单':'我的房间'}}</text>
			<text class="fs-24 color-666" @click="jump('/pages/my/fangjian_three?shop_id='+shop_id)">预定记录</text>
		</view>
		
		<view class="padding-24 fs-28 color-333">设定座位数</view>
		<view v-for="(item,index) in list" :key='index' class="padding-x-24 padding-y-30 bg-fff flex align-center justify-between solid-bottom">
			<text class="fs-28 color-333 w30">{{item.name}}</text>
			<text class="fs-28 color-zhuse fw-600 flex1">{{item.total}}</text>
			<view class="fs-26 color-666">已预订：<text class="color_red">{{item.order}}</text></view>
		</view>
		
		<empty v-if="list.length < 1"></empty>
		<!-- <view class="padding-24 fs-28 color-333">预定管理</view>
		<view class="padding-x-24 padding-y-30 bg-fff flex align-center justify-between">
			<text class="fs-28 color-333 w30">总包间数</text>
			<text class="fs-28 color-zhuse fw-600 flex1">2930</text>
			
		</view>
		<view class="padding-x-24 padding-y-30 bg-fff flex align-center justify-between">
			<text class="fs-28 color-333 w30">大厅总桌位</text>
			<text class="fs-28 color-zhuse fw-600 flex1">2930</text>
			<view class="fs-26 color-666">已预订：<text class="color_red">16</text></view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				classify_pid:'',
				shop_id:'',
				list:[]
			}
		},
		onLoad(opt) {
			this.classify_pid = opt.cate_id;
			this.shop_id = opt.shop_id;
			this.getInfo()
		},
		methods:{
			getInfo(){
				this.$api.shop_room({classify_pid:this.classify_pid}).then(res=>{
					if(res.code == 1){
						this.list = res.data
					}else{
						this.$msg(res.msg);
						setTimeout(()=>{
							uni.navigateBack()
						},500)
					}
				})
			}
		}
	}
</script>

<style>
	page{background: #F7F7F7;}
	.color_red{color: #EC6A2C;}
</style>
